Skip to content

chore(infra): migrate plugins to Rstack CLI - #31

Merged
SoonIter merged 5 commits into
mainfrom
chore/repo-infrastructure-update
Aug 4, 2026
Merged

chore(infra): migrate plugins to Rstack CLI#31
SoonIter merged 5 commits into
mainfrom
chore/repo-infrastructure-update

Conversation

@SoonIter

@SoonIter SoonIter commented Jul 31, 2026

Copy link
Copy Markdown
Member

This PR standardizes all 13 plugin packages on shared Rstack CLI workflows for builds, docs, linting, tests, and Git hooks, while retaining package-specific Rslib configuration only where required.

It aligns CI and the workspace on Node.js 24.18.0, pnpm 11, Rslib v1, TypeScript 6, and the latest @rspress/core 2.0.19. The back-to-top package compiles its Less into published CSS so consumers do not need a Less plugin.

Related Links

Copilot AI review requested due to automatic review settings July 31, 2026 08:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@SoonIter, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 32654cf5-ce21-4b68-81a8-5fb660b53fc8

📥 Commits

Reviewing files that changed from the base of the PR and between 51e4b80 and e72974e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (70)
  • .changeset/config.json
  • .gitattributes
  • .github/workflows/test-Windows.yml
  • .github/workflows/test-macOS.yml
  • .gitignore
  • .node-version
  • .npmrc
  • .prettierignore
  • AGENTS.md
  • e2e/utils.ts
  • package.json
  • packages/rspress-plugin-align-image/package.json
  • packages/rspress-plugin-align-image/rspress.config.ts
  • packages/rspress-plugin-align-image/rstack.config.ts
  • packages/rspress-plugin-back-to-top/package.json
  • packages/rspress-plugin-back-to-top/rspress.config.ts
  • packages/rspress-plugin-back-to-top/rstack.config.ts
  • packages/rspress-plugin-back-to-top/src/index.ts
  • packages/rspress-plugin-devkit/components/DevkitCode.tsx
  • packages/rspress-plugin-devkit/docs/index.md
  • packages/rspress-plugin-devkit/package.json
  • packages/rspress-plugin-devkit/rslib.config.ts
  • packages/rspress-plugin-devkit/rspress.config.ts
  • packages/rspress-plugin-devkit/rstack.config.ts
  • packages/rspress-plugin-devkit/src/NodeFactory/ESTreeNodeFactory.ts
  • packages/rspress-plugin-directives/components/Oops.tsx
  • packages/rspress-plugin-directives/package.json
  • packages/rspress-plugin-directives/rspress.config.ts
  • packages/rspress-plugin-directives/rstack.config.ts
  • packages/rspress-plugin-file-tree/package.json
  • packages/rspress-plugin-file-tree/rspress.config.ts
  • packages/rspress-plugin-file-tree/rstack.config.ts
  • packages/rspress-plugin-file-tree/tests/esmImport.test.ts
  • packages/rspress-plugin-file-tree/tests/parser.test.ts
  • packages/rspress-plugin-gh-pages/package.json
  • packages/rspress-plugin-gh-pages/rspress.config.ts
  • packages/rspress-plugin-gh-pages/rstack.config.ts
  • packages/rspress-plugin-google-analytics/package.json
  • packages/rspress-plugin-google-analytics/rspress.config.ts
  • packages/rspress-plugin-google-analytics/rstack.config.ts
  • packages/rspress-plugin-katex/package.json
  • packages/rspress-plugin-katex/rspress.config.ts
  • packages/rspress-plugin-katex/rstack.config.ts
  • packages/rspress-plugin-live2d/package.json
  • packages/rspress-plugin-live2d/rspress.config.ts
  • packages/rspress-plugin-live2d/rstack.config.ts
  • packages/rspress-plugin-mermaid/package.json
  • packages/rspress-plugin-mermaid/rspress.config.ts
  • packages/rspress-plugin-mermaid/rstack.config.ts
  • packages/rspress-plugin-reading-time/components/ReadingTime.tsx
  • packages/rspress-plugin-reading-time/package.json
  • packages/rspress-plugin-reading-time/rspress.config.ts
  • packages/rspress-plugin-reading-time/rstack.config.ts
  • packages/rspress-plugin-supersub/package.json
  • packages/rspress-plugin-supersub/rspress.config.ts
  • packages/rspress-plugin-supersub/rstack.config.ts
  • packages/rspress-plugin-vercel-analytics/package.json
  • packages/rspress-plugin-vercel-analytics/rspress.config.ts
  • packages/rspress-plugin-vercel-analytics/rstack.config.ts
  • pnpm-workspace.yaml
  • rslint.config.ts
  • rstack.config.ts
  • rstest.config.ts
  • scripts/rstack/lib.ts
  • templates/package.json
  • templates/rspress.config.ts
  • templates/rstack.config.ts
  • tsconfig.base.json
  • tsconfig.json
  • types/assets.d.ts
📝 Walkthrough

Walkthrough

The repository migrates package builds, documentation builds, linting, testing, and CI workflows to Rstack tooling. Package metadata now uses explicit distribution paths, export maps, catalog dependencies, and published plugin imports. Shared E2E server management replaces manual process handling. Playwright coverage expands across plugin examples. Node.js, pnpm, TypeScript, workspace, and package template configuration are updated.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary change: migrating plugin infrastructure to the Rstack CLI.
Description check ✅ Passed The description accurately covers the Rstack migration, version alignment, CI updates, and added Playwright coverage.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/repo-infrastructure-update

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🧹 Nitpick comments (1)
.github/workflows/test-Windows.yml (1)

23-26: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Checkout steps in both OS workflows persist credentials by default. actions/checkout keeps the GitHub token in the local git config unless persist-credentials: false is set. Both workflows run lint, build, and test commands against dependency code after checkout, so disabling persistence reduces the credential's exposure window as defense-in-depth, even though the job token is already scoped to contents: read.

  • .github/workflows/test-Windows.yml#L23-L26: add persist-credentials: false to the actions/checkout step.
  • .github/workflows/test-macOS.yml#L23-L26: add persist-credentials: false to the actions/checkout step.
🛠️ Proposed fix (apply to both files)
       - name: Checkout
         uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
         with:
           fetch-depth: 1
+          persist-credentials: false
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/test-Windows.yml around lines 23 - 26, Update the
actions/checkout step in .github/workflows/test-Windows.yml (lines 23-26) and
.github/workflows/test-macOS.yml (lines 23-26) to set persist-credentials to
false, leaving the existing checkout configuration unchanged.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@e2e/utils.ts`:
- Around line 74-89: Update the waitForServer rejection handler in runDevCommand
to terminate childProcess before rejecting, ensuring startup failures clean up
the spawned process even when useRstackDocServer has not assigned devProcess
yet. Apply the same cleanup behavior to the corresponding startup path around
the later referenced block.

In `@packages/rspress-plugin-align-image/rspress.config.ts`:
- Line 3: Make the in-workspace imports resolve during clean type checking:
update the TypeScript path/package resolution or lint build order for
packages/rspress-plugin-align-image/rspress.config.ts and
packages/rspress-plugin-back-to-top/rspress.config.ts so their package names
resolve to source files or generated dist entrypoints before rs lint
--type-check runs; apply the same resolution fix to both sites.

In `@packages/rspress-plugin-devkit/rspress.config.ts`:
- Around line 3-13: Update the import of
RemarkCodeBlockToGlobalComponentPluginFactory in rspress.config.ts to reference
the package’s source index export instead of the package root, ensuring CI
resolves the factory before distribution build output is available and preserves
strict-safe typing for propsProvider.

In `@packages/rspress-plugin-file-tree/package.json`:
- Around line 43-55: Add the package’s own workspace package as a devDependency
in packages/rspress-plugin-file-tree/package.json, and apply the same
self-referencing dependency fix in
packages/rspress-plugin-gh-pages/package.json. Ensure the build runs before
type-checking the published-name imports in
packages/rspress-plugin-file-tree/rspress.config.ts and
packages/rspress-plugin-gh-pages/rspress.config.ts; those config files require
no direct change.

In `@packages/rspress-plugin-google-analytics/rspress.config.ts`:
- Around line 3-11: Make the self-package import in rspress.config.ts resolvable
before the package is built by configuring the development typecheck path to
target the package’s src/index.ts, or ensure the package build generates
dist/index.d.ts before this config is checked. Update the relevant package or
workspace TypeScript/build configuration while preserving the existing
rspress-plugin-google-analytics import.

In `@packages/rspress-plugin-katex/rspress.config.ts`:
- Line 3: Resolve the local plugin self-imports before documentation
configuration typechecking by using a resolvable source entry or adding an
appropriate source export condition. Apply the same fix to the imports in
packages/rspress-plugin-katex/rspress.config.ts:3-3,
packages/rspress-plugin-live2d/rspress.config.ts:3-3, and
packages/rspress-plugin-mermaid/rspress.config.ts:3-3 so Rstack and TypeScript
resolve each plugin before its built exports and declarations exist.

In `@packages/rspress-plugin-reading-time/rspress.config.ts`:
- Line 3: Make the self-references for rspress-plugin-reading-time,
rspress-plugin-supersub, and rspress-plugin-vercel-analytics resolvable during
docs type checks by adding appropriate source mappings in each package
manifest/exports, or ensure rs lib runs before config validation. Apply the
change at packages/rspress-plugin-reading-time/rspress.config.ts:3,
packages/rspress-plugin-supersub/rspress.config.ts:3, and
packages/rspress-plugin-vercel-analytics/rspress.config.ts:3; all three sites
require the same resolution fix.

In `@rstack.config.ts`:
- Around line 28-33: Remove the global '`@typescript-eslint/no-explicit-any`':
'off' entry from the rules configuration in rstack.config.ts so the
repository-wide lint command enforces the strict-safe TypeScript guideline. If
an exception is required, scope it to only the specific files or patterns that
genuinely need it rather than disabling the rule for all packages.

In `@tsconfig.base.json`:
- Around line 3-7: Enable full TypeScript strict mode by adding "strict": true
to the shared compiler options in tsconfig.base.json, alongside the existing
target and module settings. Review every tsconfig that extends this base
configuration and resolve any type-checking issues introduced by the stricter
checks.

---

Nitpick comments:
In @.github/workflows/test-Windows.yml:
- Around line 23-26: Update the actions/checkout step in
.github/workflows/test-Windows.yml (lines 23-26) and
.github/workflows/test-macOS.yml (lines 23-26) to set persist-credentials to
false, leaving the existing checkout configuration unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d81d423d-b4a7-419b-a487-86caa4523e30

📥 Commits

Reviewing files that changed from the base of the PR and between a59a167 and 51e4b80.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (83)
  • .changeset/config.json
  • .github/workflows/test-Windows.yml
  • .github/workflows/test-macOS.yml
  • .gitignore
  • .node-version
  • .npmrc
  • .prettierignore
  • AGENTS.md
  • e2e/utils.ts
  • package.json
  • packages/rspress-plugin-align-image/index.spec.ts
  • packages/rspress-plugin-align-image/package.json
  • packages/rspress-plugin-align-image/rspress.config.ts
  • packages/rspress-plugin-align-image/rstack.config.ts
  • packages/rspress-plugin-back-to-top/index.spec.ts
  • packages/rspress-plugin-back-to-top/package.json
  • packages/rspress-plugin-back-to-top/rspress.config.ts
  • packages/rspress-plugin-back-to-top/rstack.config.ts
  • packages/rspress-plugin-back-to-top/src/index.ts
  • packages/rspress-plugin-devkit/components/DevkitCode.tsx
  • packages/rspress-plugin-devkit/docs/index.md
  • packages/rspress-plugin-devkit/index.spec.ts
  • packages/rspress-plugin-devkit/package.json
  • packages/rspress-plugin-devkit/rslib.config.ts
  • packages/rspress-plugin-devkit/rspress.config.ts
  • packages/rspress-plugin-devkit/rstack.config.ts
  • packages/rspress-plugin-devkit/src/NodeFactory/ESTreeNodeFactory.ts
  • packages/rspress-plugin-directives/components/Oops.tsx
  • packages/rspress-plugin-directives/index.spec.ts
  • packages/rspress-plugin-directives/package.json
  • packages/rspress-plugin-directives/rspress.config.ts
  • packages/rspress-plugin-directives/rstack.config.ts
  • packages/rspress-plugin-file-tree/index.spec.ts
  • packages/rspress-plugin-file-tree/package.json
  • packages/rspress-plugin-file-tree/rspress.config.ts
  • packages/rspress-plugin-file-tree/rstack.config.ts
  • packages/rspress-plugin-file-tree/tests/esmImport.test.ts
  • packages/rspress-plugin-file-tree/tests/parser.test.ts
  • packages/rspress-plugin-gh-pages/index.spec.ts
  • packages/rspress-plugin-gh-pages/package.json
  • packages/rspress-plugin-gh-pages/rspress.config.ts
  • packages/rspress-plugin-gh-pages/rstack.config.ts
  • packages/rspress-plugin-google-analytics/index.spec.ts
  • packages/rspress-plugin-google-analytics/package.json
  • packages/rspress-plugin-google-analytics/rspress.config.ts
  • packages/rspress-plugin-google-analytics/rstack.config.ts
  • packages/rspress-plugin-katex/index.spec.ts
  • packages/rspress-plugin-katex/package.json
  • packages/rspress-plugin-katex/rspress.config.ts
  • packages/rspress-plugin-katex/rstack.config.ts
  • packages/rspress-plugin-live2d/index.spec.ts
  • packages/rspress-plugin-live2d/package.json
  • packages/rspress-plugin-live2d/rspress.config.ts
  • packages/rspress-plugin-live2d/rstack.config.ts
  • packages/rspress-plugin-mermaid/index.spec.ts
  • packages/rspress-plugin-mermaid/package.json
  • packages/rspress-plugin-mermaid/rspress.config.ts
  • packages/rspress-plugin-mermaid/rstack.config.ts
  • packages/rspress-plugin-reading-time/components/ReadingTime.tsx
  • packages/rspress-plugin-reading-time/index.spec.ts
  • packages/rspress-plugin-reading-time/package.json
  • packages/rspress-plugin-reading-time/rspress.config.ts
  • packages/rspress-plugin-reading-time/rstack.config.ts
  • packages/rspress-plugin-supersub/index.spec.ts
  • packages/rspress-plugin-supersub/package.json
  • packages/rspress-plugin-supersub/rspress.config.ts
  • packages/rspress-plugin-supersub/rstack.config.ts
  • packages/rspress-plugin-vercel-analytics/index.spec.ts
  • packages/rspress-plugin-vercel-analytics/package.json
  • packages/rspress-plugin-vercel-analytics/rspress.config.ts
  • packages/rspress-plugin-vercel-analytics/rstack.config.ts
  • playwright.config.ts
  • pnpm-workspace.yaml
  • rslint.config.ts
  • rstack.config.ts
  • rstest.config.ts
  • scripts/rstack/lib.ts
  • templates/package.json
  • templates/rspress.config.ts
  • templates/rstack.config.ts
  • tsconfig.base.json
  • tsconfig.json
  • types/assets.d.ts
💤 Files with no reviewable changes (3)
  • rstest.config.ts
  • rslint.config.ts
  • packages/rspress-plugin-devkit/rslib.config.ts

Comment thread e2e/utils.ts Outdated
Comment thread packages/rspress-plugin-align-image/rspress.config.ts
Comment thread packages/rspress-plugin-devkit/rspress.config.ts
Comment thread packages/rspress-plugin-file-tree/package.json
Comment thread packages/rspress-plugin-google-analytics/rspress.config.ts
Comment thread packages/rspress-plugin-katex/rspress.config.ts
Comment thread packages/rspress-plugin-reading-time/rspress.config.ts
Comment thread rstack.config.ts
Comment thread tsconfig.base.json
@SoonIter
SoonIter force-pushed the chore/repo-infrastructure-update branch from 9faddd4 to e72974e Compare July 31, 2026 09:55
@SoonIter
SoonIter marked this pull request as draft August 4, 2026 04:00
@SoonIter

SoonIter commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

@codex review

@SoonIter

SoonIter commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 2b59b110f3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@SoonIter
SoonIter force-pushed the chore/repo-infrastructure-update branch from 2b59b11 to 4e1f13b Compare August 4, 2026 07:30
@SoonIter
SoonIter marked this pull request as ready for review August 4, 2026 07:39

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4e1f13b76f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread templates/rspress.config.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f7e689b5ba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/rspress-plugin-align-image/package.json Outdated
@SoonIter
SoonIter force-pushed the chore/repo-infrastructure-update branch from d8be77e to 4465c1b Compare August 4, 2026 08:03
@SoonIter
SoonIter force-pushed the chore/repo-infrastructure-update branch from 4465c1b to 0aafac9 Compare August 4, 2026 08:18
@SoonIter
SoonIter merged commit b732edd into main Aug 4, 2026
2 checks passed
@SoonIter
SoonIter deleted the chore/repo-infrastructure-update branch August 4, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants